﻿
Partial Class request_login
    Inherits System.Web.UI.Page

    Protected Sub CreateUserWizard1_CreatedUser(sender As Object, e As System.EventArgs) Handles CreateUserWizard1.CreatedUser
        Dim userid As String = Membership.GetUser(CreateUserWizard1.UserName).ProviderUserKey.ToString
        Dim uni_id As DropDownList = CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("UniDropDownList")
        'Try
        ACSService.addUniAdmin(userid, uni_id.SelectedValue.ToString)
        Dim User As MembershipUser = Membership.GetUser(CreateUserWizard1.UserName)
        User.Comment = uni_id.SelectedItem.Text
        Roles.AddUserToRole(User.UserName, "Role_Uni_Admin")
        Membership.UpdateUser(User)
        Response.Redirect("success.aspx")
        ' Catch ex As Exception
        'Membership.DeleteUser(CreateUserWizard1.UserName)
        'Throw New Exception("Account not created")
        ' End Try
    End Sub
End Class
